home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp48hor1
/
moon.doc
< prev
next >
Wrap
Text File
|
1995-03-31
|
4KB
|
89 lines
(Comp.sys.handhelds)
Item: 315 by fin at norge.unet.umn.edu
Author: Craig A. Finseth
Subj: HP-48SX Program to Calculate/Show the Phase of the Moon
Date: Wed Apr 04 1990 16:14
[Note: See MOON2 for an improved version. -jkh-]
In order for bugs to depend on the phase of the moon, they must first
be able to find out what the phase of the moon is. This program
should help.
Note: this program uses a first-order sine approximation. The correct
expression contains about 30 sine terms. Still, what you see displayed
corresponds reasonably well with what you see in the sky...
MPHASE Calculate and show the phase of the moon for the current date/time
MTIME Calculate and show the moon time string for the current date/time
MFRAC Calculate the moon phase fraction (0 new moon; .25 first quarter;
.5 full moon; .75 last quarter)
FLIP Invert the screen. Fast, but displays garbage during the flip.
MPLOT Internal to MPHASE: Plot the crescent
MLINE Internal to MPHASE: Draw a line of the crescent
Notes:
- If you want to generalize the date/time calculated for, change MFRAC.
- You can omit the flip by removing the call to FLIP from MPHASE.
- The base time for new moon is 12 Jan 1975 at 10:21 am GMT (4:21
AM CST, which is the figure used in the program).
- The moon cycle is assumed to be 42,532 minutes long.
Checksum: #3794h
Size: 1153.5
Craig A. Finseth fin@unet.umn.edu [CAF13]
University Networking Services +1 612 624 3375 desk
University of Minnesota +1 612 626 1002 FAX
130 Lind Hall, 207 Church St SE, Minneapolis MN 55455-0134, U.S.A.
-------------------------------------------------------------------------------
Resp: 1 of 1 by prestonb at hpcvra.CV.HP.COM
Author: Preston Brown
Date: Fri Apr 06 1990 16:49
If you don't want to glitch the display then change FLIP to:
FLIP
\<< PICT PICT RCL NEG {#0 #0} SWAP REPL \>>
This version is also faster.
Preston
-------------------------------------------------------------------------------
(Feedbackto.hp) Main: r
Item: 16 by _davidmotto at hpcvbbs.UUCP
Author: David G Motto
Subj: HP-48SX Date command
Keyw: date hp-48
Date: Sun Apr 08 1990 05:57
How come I can't set the "date" on my 48SX to a date in the far
past? I input the "Moon phase" programs, and I want to see the
phase of the moon when I was born. No, it wasn't before Oct 15,
1582! Where does it say what the range of "date settings" can
be? Can the "Moon phase" program be rewritten to use previous
dates? (It is in user.programs).
-------------------------------------------------------------------------------
Resp: 1 of 1 by meghas at hpcvbbs.UUCP
Author: Megha Shyam
Date: Tue Apr 17 1990 11:00
Hello David:
In the TIME application, you are correct in discovering that you
set the date of the HP 48SX to any arbitrary date. In fact there
is only a finite range (Jan 1, 1989 to Dec 31, 2088). This is not
indicated anywhere in the manual unfortunately. We had to make some
choices when working in this area: number of days calculation between
two given dates does accept a wide range of dates; however to set a
date to a given value we had to truncate it to only a 100 year
range and we choose the starting point as Jan 1, 1989. Thus the
"Moon Phase" program rewrite is very tedious and cumbersome.
Megha Shyam
Hewlett-Packard